#ifndef __CPPTUTORCONCRETEOBSERVERANALOGCLOCK_H__
#define __CPPTUTORCONCRETEOBSERVERANALOGCLOCK_H__

#include "cppTutorObserver.h"
#include "cppTutorConcreteSubjectClockTimer.h"

//=========================================================
// ConcreteObserver class
//
// AnalogClock
//
// It is a ConcreteObserver class and is a child class of
// the Observer class.
//
// It is a analog clock observer. It attaches to a timer
// object of the type Subject at run time. The timer
// object calls AnalogClock member function Update()
// whenever there is a AnalogClock update required.
// AnalogClock obtain current time from the timer object
// by timer object's member functions GetHour(),
// GetMinutes, and GetSecond(). AnalogClock prints out
// the updated time.
//
//=========================================================
class AnalogClock: public Observer 
{
    public:
        AnalogClock(ClockTimer *);  // attach with subject
        ~AnalogClock();    // detach with subject

        void Update(Subject *);   // update own time
        void Draw();     // print updated time
    
    private:
        ClockTimer *_subject;   // reference to subject
};

#endif //__CPPTUTORCONCRETEOBSERVERANALOGCLOCK_H__
